;------------------------------------------------
; "DOOR" startup script for InterChange. |
; by Philip L. Becker Last Revised 06/19/93 |
;------------------------------------------------
; Notes:
;
; S1 = name of the door program to run. It is made parametric here
; so that you can easily handle passing the name in any way
; you wish (such as a %Pn% param, or make the script present
; a selection menu, etc.)...
;------------------------------------------------------------------------
SET S1="%P2%"
IF NOT S1 = "" GOTO STARTUP
;
; No door name passed as /P2:"door", so assume LNP wanted...
;
SET S1="LNP"
;--------------------------
:STARTUP
Message "Accessing door..."
ECHO OFF
;
;-------------------------------------------------------
; List all lines you have hooked to door computers
; in this GRAB command. Interchange will try them in
; the order you list them here.
;
; Example: GRAB 5-7,10,12 NO_LINES
;
; This example assumes lines 5, 6, 7, 10, and 12 are door machines.
;-------------------------------------------------------------------
GRAB 2 NO_LINES
;
;----------------------------------------------------------------
; Following assumes that /P1:"%TIMELEFT%" given on Opt Data that
; called InterChange. If it is missing, user is given unlimited
; time in the door.
;
SET S2="%P1%"
IF S2="" GOTO UNLIM
IF S2="Unlimited" GOTO UNLIM
GOTO CHKANS
:UNLIM
; Set door time = unlimited (big number)
SET S2="32767"
;
;----------------------------------------
; Now send proper graphics strings in S3
;
:CHKANS
SET S3="NG 0"
IF NOT ANSI GOTO NON_ANS
SET S3="GR 1"
:NON_ANS
;
;------------------------------------------------------------------------
; Send parameter string to TDOOR to startup the door program |
; |
; Note: %Y = COM PORT and %Z = bps rate in .TDT files... |
; |
; Params sent here map to % params for TDOOR .TDT files as follows: |
; |
; %0 %1 %2 %3 %4 %5&6 %7 |
; --- -------- ------------ ------------ ---- ---- --------- |
XMIT "TBBS: %S1% '%NAME%' '%LOCATION%' '%PASSWORD%' %S2% %S3% '%FIRST%'^M"
;------------------------------------------------------------------------
;
; Now wait for TDOOR to respond with "OK", "ERROR", or "ERROR1"
;
PATTERN 1 'OK^M'
PATTERN 2 'ERROR^M'
PATTERN 3 'ERROR1^M'
WAIT 5 RESPOND
IF NOT 1 GOTO ERROR
SESSION
END
;------------------------------------------------------------------------
; TDOOR responded "ERROR" indicating problem w/request
;
:ERROR
RELEASE
Pause "Error starting Door. Press Any Key..."
END
;------------------------------------------------------------------------
; TDOOR did not respond in 5 seconds. Probably dead over there...
;
:RESPOND
RELEASE
Pause "Door not responding. Press Any Key..."
END
;------------------------------------------------------------------------
; The GRAB couldn't get a line. All door lines are busy...
;
:NO_LINES
Pause "Doors not available now, try later. Press Any Key..."
END